/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package message;

import java.io.File;
import java.io.IOException;
import java.util.Date;

/**
 *
 * @author Administrator
 */
public interface MessageInterface {

    /**
     * This method is used to get message name
     * @return
     */
    String getName();

    /**
     * This method is used to get message receiver
     * @return receiver mail
     */
    String getReceiver();

    /**
     * This method is used to get message sent date
     * @return message send date
     */
    Date getSendDate();

    /**
     * This method is used to get message sender
     * @return sender mail
     */
    String getSender();

    /**
     * This method is used to get message subject
     * @return message subject
     */
    String getSubject();

    /**
     * This method is used to know if this message is read before or not
     * @return true if this message read before else return false
     */
    boolean isRead();

    /**
     * This method is used to read message information from file
     * and set all message data from data which read from file
     * @param m file which contains message data(messInfo file which exist in every message)
     * @throws java.io.IOException
     */
    void readMessageInfo(File m) throws IOException;

    /**
     * Excess Code
     * This method is used to set some of  message data
     * @param s array that contains message subject and receiver
     * @param messageSender  message Sender
     */
    void setMessageData(String[] s, String messageSender);

    /**
     * This method is used to set message name
     * @param name
     */
    void setName(String name);

    /**
     * This method is used to set message read
     * @param read set if this message read before of not
     */
    void setRead(boolean read);

    /**
     * This method is used to set message receiver
     * @param receiver new message receiver
     */
    void setReceiver(String receiver);

    /**
     * This method is used to set message send date
     * @param sendDate new message send date
     */
    void setSendDate(Date sendDate);

    /**
     * This method is used to set message sender
     * @param sender
     */
    void setSender(String sender);

    /**
     * This method is used to set message subject
     * @param subject new message subject
     */
    void setSubject(String subject);

}
